package com.fzdy.product.dao;

import com.fzdy.product.entity.User;

import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.Date;
import java.util.List;

public interface UserDao extends JpaRepository<User,Integer>{
    User getByNameAndPassword(String name,String password);
    List<User> getAllByRoleName(String name);
    Page<User> findAllByName(Pageable page,String name);
    Page<User> findAllByCreateDateBetween(Pageable page,Date begin,Date end);
}
